﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/Jifen.master" AutoEventWireup="true" CodeFile="AuctionDetail.aspx.cs" Inherits="SY.WebSite.Web.Jifen.AuctionDetail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <title>正在拍卖 - 素币系统 - <%= Settings.Title %></title>
    <script src="<%= Settings.StaticFileDomain %>/Scripts/util/template/trimpath-template.js" type="text/javascript"></script>
    <script src="<%= Settings.StaticFileDomain %>/Scripts/util/cookie.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" Runat="Server">
    <div id="errorPanel" style="display:none">
        <div class="row">
            <div class="twelve columns">
                <div class="panel">
                    <p>参数错误，请关闭页面</p>
                </div>
            </div>
        </div>
    </div>
    
    <div class="row" id="info" style="display:none">
        <div class="twelve columns" style="min-height:150px;">
            <div class="panel">
                <img src="<%= CurrentAuction.Image %>" style="width:120px; height:120px; position:absolute;" alt="<%= CurrentAuction.Title %>" />
                <div class="auction-info">
                    <label class="title"><strong><%= CurrentAuction.Title %></strong></label>
                    <p><%= CurrentAuction.StartTime.ToString("yyyy-MM-dd HH:mm") %> - <%= CurrentAuction.EndTime.ToString("yyyy-MM-dd HH:mm") %></p>
                    <p>数量：<%= CurrentAuction.Count %></p>
                    <p><%= CurrentAuction.Description %></p>
                </div>
            </div>
        </div>
    </div>
    <div id="result"></div>
    
    <textarea name="auctionlist" id="auctionlist" style="display:none;">       
        {for l in list}
            <div class="row">
                <div class="twelve columns">
                    <div class="panel">
                        <div class="row">
                            <div class="nine columns info" style="min-height:150px;">
                                <img src="@{l.Image}" style="width:120px; height:120px; position:absolute;" alt="@{l.Title}" />
                                <div class="auction-info">
                                    <label class="title"><strong>@{l.Title}</strong></label>
                                    <label>￥@{l.Price}</label>
                                    <p>@{l.Description}</p>
                                    {if l.Bidder != 0}
                                        最终竞拍素币：&nbsp;&nbsp;<span>@{l.BidderName}</span>&nbsp;&nbsp;<label>@{l.BidAmount}</label>
                                    {elseif}
                                        该物品流拍
                                    {/if}
                                </div>
                            </div>
                            <div class="three columns">
                                <input type="button" class="button small w120" value="查看竞拍详情" onclick="page.showBid(@{l.AuctionId}, @{l.Id})" />
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        {/for}
    </textarea>

    <textarea name="auction_detail" id="auction_detail" style="display:none;">     
        <div class="twelve columns">
            <div class="panel" style="margin-bottom:8px">
                <img src="@{Image}" style="width:120px; height:120px; position:absolute;" alt="@{Title}" />
                <div class="auction-info">
                    <label class="title"><strong>@{Title}</strong></label>
                    <label>￥@{Price}</label>
                    <p>@{Description}</p>
                </div>
            </div>
            <div id="bilist"></div>
        </div>
        @{page.getBid(AuctionId, Id)}
    </textarea>

    <textarea name="bidlist" id="bidlist" style="display:none;">        
        <table class="niceTab" width="100%" cellspacing="0" cellpadding="0" border="0">
            <thead>
                <tr><th class="four">时间</th><th class="four">竞拍者</th><th class="four">素币数</th></tr>
            </thead>
            <tbody>
                {for l in list}
                    <tr><td class="center">@{l.CreateTime.ToDate().Format("yyyy-MM-dd hh:mm:ss.S")}</td><td class="center">@{l.UserName}</td><td class="center">@{l.Amount}</td></tr>
                {forelse}
                    <tr><td colspan="3" style="text-align:center;">无竞拍记录</td></tr>
                {/for}
            </tbody>
        </table>
    </textarea>
    <script src="<%= Settings.StaticFileDomain %>/Scripts/page/jifen/auctiondetail.js" type="text/javascript"></script>
    <script type="text/javascript">
        page.currentAuction = <%= ToJson(CurrentAuction) %>;
        page.list = <%=  ToJson(AuctionItemList) %>;
    </script>
</asp:Content>

